package ranger.clips
{
    import com.lowke.animator.Animator;
    import com.lowke.animator.effect.PlayFramesFX;
    import com.lowke.animator.effect.VelocityFX;

    public class EnemyShip extends Clip
    {
        public function EnemyShip()
        {
            super("EnemyShip", true);
            
            // random fps
            var fps:Number = randomInt(15, 30)*(randomInt(0, 1) ? 1 : -1);
            _anime.addEffect(PlayFramesFX.fps(fps));
            
            // random x & y velocity
            var velocityX:Number = randomInt(60, 120)/1000*(randomInt(0, 1) ? 1 : -1);
            _anime.addEffect(new VelocityFX('x', velocityX, width/2, RussellStarling.WIDTH - width/2, false, Animator.TYPE_REVERSE));
            var velocityY:Number = randomInt(60, 120)/1000*(randomInt(0, 1) ? 1 : -1);
            _anime.addEffect(new VelocityFX('y', velocityY, height/2, RussellStarling.HEIGHT - height/2, false, Animator.TYPE_REVERSE));
        }
    }
}